import { defineStore } from "pinia";
import { ref } from "vue";
export const userInfoStore =  defineStore('userInfo', () => {
    // 定义数据
    const info = ref('')

    // 定义方法
    const setInfo = (newInfo) => {
        info.value = newInfo
    }

    // 移除token
    const removeInfo = () => {
        info.value = ''
    }

    return {
        info,
        setInfo,
        removeInfo
    }
},
    {
        persist: true
    }

)